const demo = {
  id: 1,
  package_id: 1,
  freight_id: 1,
  freight_company: '呵呵',
  payment_type: 1,
  service_channel: 1,
  status: 1,
  create_time: '2018-11-21T08:26:20.000Z'
}
module.exports = function(req, res) {
  const id = req.body.order_code || 1
  const type = count => {
    return (id % count) + 1
  }

  demo.id = id
  demo.order_code = id
  demo.customer_id = 'c' + id
  demo.package_id = 'p' + id
  demo.freight_id = 'f' + id
  demo.freight_company = 'company' + id
  demo.payment_type = type(2)
  demo.service_channel = type(3)
  demo.status = type(5)
  demo.good_type = type(4)
  demo.package_type = type(2)
  demo.good_num = Math.floor(Math.random() * 100)
  demo.good_weight = Math.floor(Math.random() * 1000)
  demo.good_volume = Math.floor(Math.random() * 100)
  demo.create_time = '2018-11-21T08:26:20.000Z'
  demo.comment = '呵呵'
  demo.receiving_company = 'hehe' + id
  demo.receiving_person = 'hehehe' + id
  demo.receiving_contact = '123123'
  demo.receiving_contact2 = '123-123'
  demo.receiving_country = '呵呵country'
  demo.receiving_city = '呵呵city'
  demo.receiving_postcode = '呵呵postcode'
  demo.receiving_address = '呵呵addr'

  return {
    code: 200,
    msg: 'ok',
    total: 200,
    details: demo
  }
}
